import React from 'react'
import { Pagination } from 'antd';

export default class Page extends React.Component {
    constructor(props) {
        super(props)
        this.state = {
            total:1,
            pageSize:6
        }

        this.itemRender = this.itemRender.bind(this);
    }

    itemRender(current, type, originalElement) {
        if (type === 'prev') {
            return <a>上一页</a>;
        }
        if (type === 'next') {
            return <a>下一页</a>;
        }
        console.log(type)
        return originalElement;
    }

    render() {
        return (
            <div>
                <Pagination total={this.state.total} itemRender={this.itemRender}/>
            </div>
        )
    }
}